package com.sscw.task.enums;

/**
 * @Author: sunxuzong
 * @Date: 2024/07/19
 */
public enum CardTypeEnum {
    week_card(0, "周卡"),
    month_card(1, "月卡");

    private Integer code;

    private String desc;

    CardTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static CardTypeEnum getByCode(Integer code) {
        for (CardTypeEnum enums : CardTypeEnum.values()) {
            if (enums.getCode().equals(code)) {
                return enums;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
